// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package fr.upstlse.glre.business.service.vitrine;

import java.util.Collection;

import fr.upstlse.glre.business.domain.vitrine.PageVitrine;
import fr.upstlse.glre.business.domain.vitrine.PageVitrineDao;
import fr.upstlse.glre.business.vo.vitrine.PageVitrineVO;

/**
 * @see fr.upstlse.glre.business.service.vitrine.PageVitrineService
 */
public class PageVitrineServiceImpl
    extends fr.upstlse.glre.business.service.vitrine.PageVitrineServiceBase
{

	@Override
    protected long handleCreatePageVitrine(fr.upstlse.glre.business.vo.vitrine.PageVitrineVO pPageVitrineVO)
        throws java.lang.Exception
    {
		PageVitrineVO lPageVitrineVO = (PageVitrineVO) getPageVitrineDao().create(PageVitrineDao.TRANSFORM_PAGEVITRINEVO, getPageVitrineDao().pageVitrineVOToEntity(pPageVitrineVO));
		return lPageVitrineVO.getId();
    }

	@Override
    protected void handleUpdatePageVitrine(fr.upstlse.glre.business.vo.vitrine.PageVitrineVO pPageVitrineVO)
        throws java.lang.Exception
    {
		PageVitrine pPageVitrine = getPageVitrineDao().pageVitrineVOToEntity(pPageVitrineVO);
		getPageVitrineDao().update(pPageVitrine);
	}

	@Override
    protected void handleDeletePageVitrineVO(fr.upstlse.glre.business.vo.vitrine.PageVitrineVO pPageVitrineVO)
        throws java.lang.Exception
    {
    	getPageVitrineDao().remove(getPageVitrineDao().pageVitrineVOToEntity(pPageVitrineVO));
    }

	@Override
	protected PageVitrineVO handleGetPageVitrine(String titrePage)
			throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected PageVitrineVO[] handleGetAllPageVitrine() throws Exception {
		Collection<PageVitrineVO> lPageVitrines = getPageVitrineDao().loadAll(PageVitrineDao.TRANSFORM_PAGEVITRINEVO);
		return lPageVitrines.toArray(new PageVitrineVO[lPageVitrines.size()]);
	}

}